package com.ktgj.hotel.service.impl;

import java.util.List;
import com.ktgj.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ktgj.hotel.mapper.HotelOrderAssistMapper;
import com.ktgj.hotel.domain.HotelOrderAssist;
import com.ktgj.hotel.service.IHotelOrderAssistService;

/**
 * 酒店订单辅营产品Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-28
 */
@Service
public class HotelOrderAssistServiceImpl implements IHotelOrderAssistService 
{
    @Autowired
    private HotelOrderAssistMapper hotelOrderAssistMapper;

    /**
     * 查询酒店订单辅营产品
     * 
     * @param id 酒店订单辅营产品ID
     * @return 酒店订单辅营产品
     */
    @Override
    public HotelOrderAssist selectHotelOrderAssistById(Long id)
    {
        return hotelOrderAssistMapper.selectHotelOrderAssistById(id);
    }

    /**
     * 查询酒店订单辅营产品列表
     * 
     * @param hotelOrderAssist 酒店订单辅营产品
     * @return 酒店订单辅营产品
     */
    @Override
    public List<HotelOrderAssist> selectHotelOrderAssistList(HotelOrderAssist hotelOrderAssist)
    {
        return hotelOrderAssistMapper.selectHotelOrderAssistList(hotelOrderAssist);
    }

    /**
     * 新增酒店订单辅营产品
     * 
     * @param hotelOrderAssist 酒店订单辅营产品
     * @return 结果
     */
    @Override
    public int insertHotelOrderAssist(HotelOrderAssist hotelOrderAssist)
    {
        hotelOrderAssist.setCreateTime(DateUtils.getNowDate());
        return hotelOrderAssistMapper.insertHotelOrderAssist(hotelOrderAssist);
    }

    /**
     * 修改酒店订单辅营产品
     * 
     * @param hotelOrderAssist 酒店订单辅营产品
     * @return 结果
     */
    @Override
    public int updateHotelOrderAssist(HotelOrderAssist hotelOrderAssist)
    {
        return hotelOrderAssistMapper.updateHotelOrderAssist(hotelOrderAssist);
    }

    /**
     * 批量删除酒店订单辅营产品
     * 
     * @param ids 需要删除的酒店订单辅营产品ID
     * @return 结果
     */
    @Override
    public int deleteHotelOrderAssistByIds(Long[] ids)
    {
        return hotelOrderAssistMapper.deleteHotelOrderAssistByIds(ids);
    }

    /**
     * 删除酒店订单辅营产品信息
     * 
     * @param id 酒店订单辅营产品ID
     * @return 结果
     */
    @Override
    public int deleteHotelOrderAssistById(Long id)
    {
        return hotelOrderAssistMapper.deleteHotelOrderAssistById(id);
    }
}
